#!/bin/sh

APP=$1

if [ "x$APP" = "x" ] ; then
	ls $ROOTDIR/etc/sites/sites.d/ | sed 's/\.conf//g'
else
	if [ -h $ROOTDIR/etc/sites/enabled.d/${1}.conf ] ; then
		echo "{$1} is already enabled."
	elif [ ! -f $ROOTDIR/etc/sites/sites.d/${1}.conf ] ; then
		echo "{$1} is not an available site."
		exit $SITE_CONFIGURATION_UNAVAILABLE
	else
		ln -s $ROOTDIR/etc/sites/sites.d/${1}.conf $ROOTDIR/etc/sites/enabled.d/
	fi
fi

